<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        function decimal2Binary(decNumber) {
            let number
            let rem;
            let remstack = new Stack();
            let binaryString = '';
            while (number > 0) {
                number = Math.floor(number / n);
                rem = Math.floor(number % n)
                remstack.push(rem);

            }
            while (!remstack.isEmpty()) {
                binaryString += remstack.pop.toString();
            }
            return binaryString;
        }
    </script>
</head>

<body>

</body>

</html>